<template>
  <div id="use-mode-selector-item" :class="item.selected?'selected':''" :style="{'margin-left':item.itemWidth}">
    <div class="inner-type-name">{{item.innerTypeName}}</div>
    <p v-if="item.innerType==1">
      <img src="@/assets/imgs/cx_gwc.png" />
    </p>
    <p v-if="item.innerType==2">
      <img src="@/assets/imgs/cx_swc.png" />
    </p>
    <p v-if="item.innerType==3">
      <img src="@/assets/imgs/czc_icon.png" />
    </p>
    <p v-if="item.innerType==4">
      <img src="@/assets/imgs/czc_icon.png" />
    </p>
    <div class="price-text">
      {{item.priceText}}
      <img src="@/assets/imgs/arrow_right.png" v-if="item.innerType==1 || item.innerType==2" />
    </div>
    <div class="price-text-cou" v-if="item.couponType==1">
      券可抵
      <span>{{item.couponPrice}}</span>元
    </div>
    <div class="price-text-cou" v-if="item.couponType==2">有可用优惠券</div>
    <div class="price-text-cou" v-if="item.couponType==3"></div>
  </div>
</template>
<script>
export default {
  name: 'use-mode-selector-item',
  props: {
    item: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      containerClass: '',
      itemWidth: ''
    };
  }
};
</script>
<style lang="stylus" scoped>
#use-mode-selector-item {
  width: 225px;
  height: 234px;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;

  .inner-type-name {
    font-size: 26px;
    color: #666;
    font-weight: 400;
    text-align: center;
  }

  .price-text {
    font-size: 24px;
    color: #666;
    font-weight: 400;
    text-align: center;
    margin-top: 15px;
  }

  .price-text img {
    width: 15px;
  }

  .price-text-cou {
    font-size: 24px;
    color: #666;
    font-weight: 400;
    text-align: center;
    margin-top: 15px;
    padding-bottom: 15px;
  }

  .price-text-cou span {
    color: #FF6917;
  }

  p {
    text-align: center;
    margin-top: 10px;

    img {
      width: 180px;
      height: 60px;
    }
  }
}

.selected {
  border-bottom: 1px solid #FF6917;
}
</style>
